<template>
  <div class="item">
      <el-avatar class="img"
        :src="item.avatarUrl"
      ></el-avatar>
      <div class="userComment">
        <span class="name">{{item.nickname}}：</span>
        <span class="content">{{item.content}}</span>
        <div class="footer">
          <div class="time">{{$moment(item.time).format("YYYY-MM-DD hh:mm:ss") }}</div>
          <div class="iconAction">
            <span class="iconfont icon-dianzan">{{item.likedCount}}</span>
            <span class="iconfont icon-fenxiang"></span>
            <span class="iconfont icon-pinglun"></span>
          </div>
        </div>
      </div>
    </div>
 
</template>

<script>
export default {
  name:"CommentItem",
  props:{
    item:{
      type:Object
    }
  }
};
</script>

<style scoped>

 .item {
  margin-top: 12px;
  display: flex;
}
 .item >.img{
   flex-shrink: 0;
 }
 .item > .userComment {
   width: 100%;
  margin-left: 12px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  color: #333;
  line-height: 20px;
  padding-bottom: 10px;
}
 .item .name {
  color: #3498db;
}
 .item .footer {
  margin-top: 10px;
  font-size: 12px;
  color: #888;
  display: flex;
  width: 100%;
  justify-content: space-between;
}
 .item .footer .iconAction span{
  font-size: 14px;
  padding-left:10px;
}
</style>
